const userList = [
    {
        user:'admin',
        age:20,
        token:'thisisadmin',
        img:'http://img4.imgtn.bdimg.com/it/u=1616746753,2868040789&fm=11&gp=0.jpg'
    },
    {
        user:'admin-other',
        age:24,
        token:'thisisadminother',
        img:'http://img4.imgtn.bdimg.com/it/u=1616746753,2868040789&fm=11&gp=0.jpg'
    }
]

export const login = res => {
    let body = JSON.parse(res.body);
    return userList.filter(item => {
        return item.user === body.user;
    })[0];
}